package com.reflect.test;

import java.lang.reflect.Method;

public class InvokePrivateMethod {
	public static void main(String[] args) {
		Class cl = null;
		try {
			cl = Singleton.class;
			Method m1 = cl.getDeclaredMethod("getInstance");
			m1.setAccessible(true);// 调用private方法的关键一句话
			m1.invoke(cl);
		} catch (Exception e) {
			e.printStackTrace();
		}
		
		InvokeObject dong = new InvokeObject();
		dong.clone();
		
		StringBuffer dong1 = new StringBuffer("ggg");
		StringBuilder hua = new StringBuilder( "aaa");
		Object object  = new Object();
	}
	
}